package com.onlinelearn.paymentservice.exception;

public class PaymentException extends RuntimeException {
    private ErrorCode errorCode;

    public PaymentException(String message, ErrorCode errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public enum ErrorCode {
        ORDER_NOT_FOUND,
        INVALID_ORDER_STATUS,
        PAYMENT_GATEWAY_ERROR,
        INSUFFICIENT_BALANCE,
        DUPLICATE_PAYMENT,
        REFUND_NOT_ALLOWED
    }
} 